package com.lushu.chapitre1.graphics.elements.characters
{

    import com.lushu.chapitre1.graphics.elements.MovableElement;
    import com.lushu.chapitre1.graphics.elements.enums.AnimatedObjectType;
    import com.sfdk.graphics.engine.data.CharacterDefinition;
    import com.sfdk.graphics.engine.data.ForceDefinition;

    public class Character extends MovableElement
    {

        private var _characterDefinition:CharacterDefinition;


        public function Character(characterDefinition:CharacterDefinition) {
            _characterDefinition = characterDefinition;
            super(AnimatedObjectType.ANIMATION_PATH + characterDefinition.spriteName + ".pck");
            init();
        }

        private function init():void {
            this.x = _characterDefinition.startingPosition.x * 24;
            this.y = _characterDefinition.startingPosition.y * 24;
        }


        public function get characterDefinition():CharacterDefinition {
            return _characterDefinition;
        }
    }
}